.class final Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;
.super Ljava/lang/Object;
.source "AppsPromoDialog.kt"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Llt/farmis/libraries/apps_promo/AppsPromoDialog;->onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x18
    name = null
.end annotation


# instance fields
.field final synthetic $item:Llt/farmis/libraries/apps_promo/models/AppPromoModel;

.field final synthetic $view$inlined:Landroid/view/View;

.field final synthetic this$0:Llt/farmis/libraries/apps_promo/AppsPromoDialog;


# direct methods
.method constructor <init>(Llt/farmis/libraries/apps_promo/models/AppPromoModel;Llt/farmis/libraries/apps_promo/AppsPromoDialog;Landroid/view/View;)V
    .locals 0

    iput-object p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;->$item:Llt/farmis/libraries/apps_promo/models/AppPromoModel;

    iput-object p2, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;->this$0:Llt/farmis/libraries/apps_promo/AppsPromoDialog;

    iput-object p3, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;->$view$inlined:Landroid/view/View;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final onClick(Landroid/view/View;)V
    .locals 4

    const/4 p1, 0x0

    .line 50
    :try_start_0
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;->this$0:Llt/farmis/libraries/apps_promo/AppsPromoDialog;

    invoke-virtual {v0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;->this$0:Llt/farmis/libraries/apps_promo/AppsPromoDialog;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "market://details?id="

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v3, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;->$item:Llt/farmis/libraries/apps_promo/models/AppPromoModel;

    invoke-virtual {v3}, Llt/farmis/libraries/apps_promo/models/AppPromoModel;->getAppPackageName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->getUriIntent(Ljava/lang/String;)Landroid/content/Intent;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    :cond_0
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V
    :try_end_0
    .catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    throw p1

    :catch_0
    nop

    .line 52
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;->this$0:Llt/farmis/libraries/apps_promo/AppsPromoDialog;

    invoke-virtual {v0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;

    move-result-object v0

    if-eqz v0, :cond_2

    iget-object p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;->this$0:Llt/farmis/libraries/apps_promo/AppsPromoDialog;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "https://play.google.com/store/apps/details?id="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;->$item:Llt/farmis/libraries/apps_promo/models/AppPromoModel;

    invoke-virtual {v2}, Llt/farmis/libraries/apps_promo/models/AppPromoModel;->getAppPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v1}, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->getUriIntent(Ljava/lang/String;)Landroid/content/Intent;

    move-result-object p1

    invoke-virtual {v0, p1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 54
    :goto_0
    iget-object p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;->this$0:Llt/farmis/libraries/apps_promo/AppsPromoDialog;

    invoke-virtual {p1}, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->getCallbacks()Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

    move-result-object p1

    if-eqz p1, :cond_1

    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;->$item:Llt/farmis/libraries/apps_promo/models/AppPromoModel;

    invoke-virtual {v0}, Llt/farmis/libraries/apps_promo/models/AppPromoModel;->getAppPackageName()Ljava/lang/String;

    move-result-object v0

    invoke-interface {p1, v0}, Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;->onAppOpened(Ljava/lang/String;)V

    :cond_1
    return-void

    .line 52
    :cond_2
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V

    throw p1
.end method
